#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import time
from multiprocessing import Process


class Myprocess(Process):
    def __init__(self, x):
        super().__init__()
        self.x = x

    def run(self):
        print("{} 开始".format(self.x))
        time.sleep(1)
        print("{} 结束".format(self.x))


if __name__ == '__main__':
    pro = Myprocess("子进程")
    pro.start()
    print("主进程")
